module(
    name = "swift_gazelle_plugin",
    version = "0.1.0",
)

# MARK: - Runtime Dependencies

bazel_dep(name = "rules_shell", version = "0.3.0")
bazel_dep(name = "cgrindel_bazel_starlib", version = "0.25.2")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "rules_go", version = "0.50.1")
bazel_dep(name = "gazelle", version = "0.40.0")

go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk")
go_sdk.download(version = "1.23.3")

go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")
use_repo(
    go_deps,
    "com_github_bazelbuild_buildtools",
    "com_github_creasty_defaults",
    "com_github_deckarep_golang_set_v2",
    "com_github_stretchr_testify",
    "in_gopkg_yaml_v3",
    "org_golang_x_exp",
    "org_golang_x_text",
)

# MARK: - Dev Dependencies

bazel_dep(
    name = "rules_bazel_integration_test",
    version = "0.31.0",
    dev_dependency = True,
)
bazel_dep(
    name = "bazel_skylib_gazelle_plugin",
    version = "1.4.1",
    dev_dependency = True,
)
bazel_dep(
    name = "platforms",
    version = "0.0.10",
    dev_dependency = True,
)

bazel_binaries = use_extension(
    "@rules_bazel_integration_test//:extensions.bzl",
    "bazel_binaries",
    dev_dependency = True,
)
bazel_binaries.download(version_file = "//:.bazelversion")
bazel_binaries.download(version = "last_green")
use_repo(
    bazel_binaries,
    "bazel_binaries",
    "bazel_binaries_bazelisk",
    "build_bazel_bazel_.bazelversion",
    "build_bazel_bazel_last_green",
)
